package practise.hibernate.Service;

import org.springframework.transaction.annotation.Transactional;
import practise.hibernate.persistence.MoiveRecord;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xinlyu
 * Date: 7/21/12
 * Time: 12:12 PM
 * To change this template use File | Settings | File Templates.
 */
public interface MoiveService {
    @Transactional(readOnly = true)
    List<MoiveRecord> findAllMoivees();

    @Transactional(readOnly = false)
    void deleteMoive(int id);

    @Transactional(readOnly = true)
    List<MoiveRecord> findByLocation(String name);

    @Transactional(readOnly =false)
    MoiveRecord merge(MoiveRecord moive);

    @Transactional
    MoiveRecord add(MoiveRecord moive);
}
